package ynu.edu.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import ynu.edu.model.domain.GeneratedImage;


@Mapper
public interface ImagePredictMapper extends BaseMapper<GeneratedImage> {
//    @Insert("INSERT INTO generated_images (seed, truncation_psi, image_url, oss_path, create_time, update_time) " +
//            "VALUES (#{seed}, #{truncationPsi}, #{imageUrl}, #{ossPath}, #{createTime}, #{updateTime})")
//    @Options(useGeneratedKeys = true, keyProperty = "id")
//    void insert(GeneratedImage generatedImage);
//
//    @Select("SELECT id, seed, truncation_psi, image_url, oss_path, create_time, update_time " +
//            "FROM generated_images ORDER BY create_time DESC LIMIT #{limit}")
//    @Results({
//            @Result(property = "id", column = "id"),
//            @Result(property = "seed", column = "seed"),
//            @Result(property = "truncationPsi", column = "truncation_psi"),
//            @Result(property = "imageUrl", column = "image_url"),
//            @Result(property = "ossPath", column = "oss_path"),
//            @Result(property = "createTime", column = "create_time"),
//            @Result(property = "updateTime", column = "update_time")
//    })
//    List<GeneratedImage> findRecent(int limit);
}